
<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
      --><title>examsAll</title><meta name="generator" content="MATLAB 9.4"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2023-12-14"><meta name="DC.source" content="examsAll.m"><style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}

html { min-height:100%; margin-bottom:1px; }
html body { height:100%; margin:0px; font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#000; line-height:140%; background:#fff none; overflow-y:scroll; }
html body td { vertical-align:top; text-align:left; }

h1 { padding:0px; margin:0px 0px 25px; font-family:Arial, Helvetica, sans-serif; font-size:1.5em; color:#d55000; line-height:100%; font-weight:normal; }
h2 { padding:0px; margin:0px 0px 8px; font-family:Arial, Helvetica, sans-serif; font-size:1.2em; color:#000; font-weight:bold; line-height:140%; border-bottom:1px solid #d6d4d4; display:block; }
h3 { padding:0px; margin:0px 0px 5px; font-family:Arial, Helvetica, sans-serif; font-size:1.1em; color:#000; font-weight:bold; line-height:140%; }

a { color:#005fce; text-decoration:none; }
a:hover { color:#005fce; text-decoration:underline; }
a:visited { color:#004aa0; text-decoration:none; }

p { padding:0px; margin:0px 0px 20px; }
img { padding:0px; margin:0px 0px 20px; border:none; }
p img, pre img, tt img, li img, h1 img, h2 img { margin-bottom:0px; } 

ul { padding:0px; margin:0px 0px 20px 23px; list-style:square; }
ul li { padding:0px; margin:0px 0px 7px 0px; }
ul li ul { padding:5px 0px 0px; margin:0px 0px 7px 23px; }
ul li ol li { list-style:decimal; }
ol { padding:0px; margin:0px 0px 20px 0px; list-style:decimal; }
ol li { padding:0px; margin:0px 0px 7px 23px; list-style-type:decimal; }
ol li ol { padding:5px 0px 0px; margin:0px 0px 7px 0px; }
ol li ol li { list-style-type:lower-alpha; }
ol li ul { padding-top:7px; }
ol li ul li { list-style:square; }

.content { font-size:1.2em; line-height:140%; padding: 20px; }

pre, code { font-size:12px; }
tt { font-size: 1.2em; }
pre { margin:0px 0px 20px; }
pre.codeinput { padding:10px; border:1px solid #d3d3d3; background:#f7f7f7; }
pre.codeoutput { padding:10px 11px; margin:0px 0px 20px; color:#4c4c4c; }
pre.error { color:red; }

@media print { pre.codeinput, pre.codeoutput { word-wrap:break-word; width:100%; } }

span.keyword { color:#0000FF }
span.comment { color:#228B22 }
span.string { color:#A020F0 }
span.untermstring { color:#B20000 }
span.syscmd { color:#B28C00 }

.footer { width:auto; padding:10px 0px; margin:25px 0px 0px; border-top:1px dotted #878787; font-size:0.8em; line-height:140%; font-style:italic; color:#878787; text-align:left; float:none; }
.footer p { margin:0px; }
.footer a { color:#878787; }
.footer a:hover { color:#878787; text-decoration:underline; }
.footer a:visited { color:#878787; }

table th { padding:7px 5px; text-align:left; vertical-align:middle; border: 1px solid #d6d4d4; font-weight:bold; }
table td { padding:7px 5px; text-align:left; vertical-align:top; border:1px solid #d6d4d4; }





  </style></head><body><div class="content"><h2>Contents</h2><div><ul><li><a href="#2">&#1054;&#1090;&#1095;&#1105;&#1090; &#1087;&#1086; &#1074;&#1080;&#1076;&#1077;&#1086;&#1088;&#1103;&#1076;&#1091;:</a></li><li><a href="#4">&#1057; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;</a></li><li><a href="#5">&#1041;&#1077;&#1079; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;</a></li></ul></div><pre class="codeinput">clear; close <span class="string">all</span>; clc;
<span class="comment">% Names</span>
names = [<span class="string">"P1H1"</span>    <span class="string">"P1LC1"</span> <span class="string">"P1LC2"</span> <span class="string">"P1LC3"</span> <span class="string">"P1LC4"</span> <span class="string">"P1LC5"</span> <span class="string">"P1LC6"</span> <span class="string">"P1LC7"</span>     <span class="string">"P1M1"</span> <span class="string">"P1M2"</span> <span class="string">"P1M3"</span>     <span class="string">"P2LC1"</span> <span class="string">"P2LC2"</span> <span class="string">"P2LC3"</span> <span class="string">"P2LC4"</span> <span class="string">"P2LC5"</span>     <span class="string">"P3LC1"</span> <span class="string">"P3LC2"</span> <span class="string">"P3LC3"</span> <span class="string">"P3LC4"</span> <span class="string">"P3LC5"</span>];
names = [<span class="string">"P1H1"</span> <span class="string">"P1LC1"</span>];
names = [<span class="string">"P1H1"</span>];
zrp=<span class="string">"endh/"</span>; <span class="comment">% Zero Folder</span>
</pre><h2 id="2">&#1054;&#1090;&#1095;&#1105;&#1090; &#1087;&#1086; &#1074;&#1080;&#1076;&#1077;&#1086;&#1088;&#1103;&#1076;&#1091;:</h2><pre class="codeinput"><span class="keyword">for</span> iName = 1:length(names)
</pre><pre class="codeinput">    Name = names(iName);
    Path=zrp+Name+<span class="string">'/'</span>;
</pre><h2 id="4">&#1057; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;</h2><pre class="codeinput">    <span class="keyword">try</span>
        disp(Name+<span class="string">" &#1089; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;"</span>); ncPrefix=<span class="string">""</span>;
        RGB=load(Path+Name+ncPrefix+<span class="string">'_RGB.txt'</span>);
        RGBmed=Median1RGB(RGB);
        pw=rgb2pw(RGBmed, <span class="string">"Cr"</span>);
        Save(pw,Path+Name+ncPrefix+<span class="string">'_pw.txt'</span>);
        chss2(pw, Path, Name+ncPrefix);
        CloseFigure
    <span class="keyword">catch</span>
        disp(<span class="string">"ERROR: &#1054;&#1096;&#1080;&#1073;&#1082;&#1072; &#1087;&#1088;&#1080; &#1092;&#1086;&#1088;&#1084;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1080;&#1080; &#1086;&#1090;&#1095;&#1105;&#1090;&#1072; &#1087;&#1086; "</span>+Name+<span class="string">" &#1089; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;"</span>);
    <span class="keyword">end</span>
</pre><pre class="codeoutput">P1H1 &#1089; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;
&#1054;&#1082;&#1085;&#1086; &#1084;&#1077;&#1076;&#1080;&#1072;&#1085;&#1085;&#1086;&#1081; &#1092;&#1080;&#1083;&#1100;&#1090;&#1088;&#1072;&#1094;&#1080;&#1080;: 200
ERROR: &#1054;&#1096;&#1080;&#1073;&#1082;&#1072; &#1087;&#1088;&#1080; &#1092;&#1086;&#1088;&#1084;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1080;&#1080; &#1086;&#1090;&#1095;&#1105;&#1090;&#1072; &#1087;&#1086; P1H1 &#1089; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;
</pre><img vspace="5" hspace="5" src="examsAll_01.png" alt=""> <img vspace="5" hspace="5" src="examsAll_02.png" alt=""> <img vspace="5" hspace="5" src="examsAll_03.png" alt=""> <img vspace="5" hspace="5" src="examsAll_04.png" alt=""> <img vspace="5" hspace="5" src="examsAll_05.png" alt=""> <img vspace="5" hspace="5" src="examsAll_06.png" alt=""> <img vspace="5" hspace="5" src="examsAll_07.png" alt=""> <h2 id="5">&#1041;&#1077;&#1079; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;</h2><pre class="codeinput">    <span class="keyword">try</span>
        disp(Name+<span class="string">" &#1073;&#1077;&#1079; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;"</span>); ncPrefix=<span class="string">"_nc"</span>;
        RGB=load(Path+Name+ncPrefix+<span class="string">'_RGB.txt'</span>);
        RGBmed=Median1RGB(RGB);
        pw=rgb2pw(RGBmed, <span class="string">"Cr"</span>);
        Save(pw,Path+Name+ncPrefix+<span class="string">'_pw.txt'</span>);
        chss2(pw, Path, Name+ncPrefix);
        CloseFigure
    <span class="keyword">catch</span>
        disp(<span class="string">"ERROR: &#1054;&#1096;&#1080;&#1073;&#1082;&#1072; &#1087;&#1088;&#1080; &#1092;&#1086;&#1088;&#1084;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1080;&#1080; &#1086;&#1090;&#1095;&#1105;&#1090;&#1072; &#1087;&#1086; "</span>+Name+<span class="string">" &#1073;&#1077;&#1079; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;"</span>);
    <span class="keyword">end</span>
</pre><pre class="codeoutput">P1H1 &#1073;&#1077;&#1079; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;
&#1054;&#1082;&#1085;&#1086; &#1084;&#1077;&#1076;&#1080;&#1072;&#1085;&#1085;&#1086;&#1081; &#1092;&#1080;&#1083;&#1100;&#1090;&#1088;&#1072;&#1094;&#1080;&#1080;: 200
ERROR: &#1054;&#1096;&#1080;&#1073;&#1082;&#1072; &#1087;&#1088;&#1080; &#1092;&#1086;&#1088;&#1084;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1080;&#1080; &#1086;&#1090;&#1095;&#1105;&#1090;&#1072; &#1087;&#1086; P1H1 &#1073;&#1077;&#1079; &#1094;&#1074;&#1077;&#1090;&#1086;&#1074;&#1086;&#1081; &#1082;&#1086;&#1084;&#1087;&#1077;&#1085;&#1089;&#1072;&#1094;&#1080;&#1077;&#1081;
</pre><img vspace="5" hspace="5" src="examsAll_08.png" alt=""> <img vspace="5" hspace="5" src="examsAll_09.png" alt=""> <img vspace="5" hspace="5" src="examsAll_10.png" alt=""> <img vspace="5" hspace="5" src="examsAll_11.png" alt=""> <img vspace="5" hspace="5" src="examsAll_12.png" alt=""> <img vspace="5" hspace="5" src="examsAll_13.png" alt=""> <img vspace="5" hspace="5" src="examsAll_14.png" alt=""> <pre class="codeinput"><span class="keyword">end</span>
close <span class="string">all</span>;
</pre><p class="footer"><br><a href="https://www.mathworks.com/products/matlab/">Published with MATLAB&reg; R2018a</a><br></p></div><!--
##### SOURCE BEGIN #####
clear; close all; clc;
% Names
names = ["P1H1"    "P1LC1" "P1LC2" "P1LC3" "P1LC4" "P1LC5" "P1LC6" "P1LC7"     "P1M1" "P1M2" "P1M3"     "P2LC1" "P2LC2" "P2LC3" "P2LC4" "P2LC5"     "P3LC1" "P3LC2" "P3LC3" "P3LC4" "P3LC5"];
names = ["P1H1" "P1LC1"];
names = ["P1H1"];
zrp="endh/"; % Zero Folder

%%% Отчёт по видеоряду:
for iName = 1:length(names)
    Name = names(iName);
    Path=zrp+Name+'/';
    
    %% С цветовой компенсацией
    try
        disp(Name+" с цветовой компенсацией"); ncPrefix="";
        RGB=load(Path+Name+ncPrefix+'_RGB.txt');
        RGBmed=Median1RGB(RGB);
        pw=rgb2pw(RGBmed, "Cr");
        Save(pw,Path+Name+ncPrefix+'_pw.txt');
        chss2(pw, Path, Name+ncPrefix);
        CloseFigure
    catch
        disp("ERROR: Ошибка при формировании отчёта по "+Name+" с цветовой компенсацией");
    end
    
    %% Без цветовой компенсацией
    try
        disp(Name+" без цветовой компенсацией"); ncPrefix="_nc";
        RGB=load(Path+Name+ncPrefix+'_RGB.txt');
        RGBmed=Median1RGB(RGB);
        pw=rgb2pw(RGBmed, "Cr");
        Save(pw,Path+Name+ncPrefix+'_pw.txt');
        chss2(pw, Path, Name+ncPrefix);
        CloseFigure
    catch
        disp("ERROR: Ошибка при формировании отчёта по "+Name+" без цветовой компенсацией");
    end
end
close all;
##### SOURCE END #####
--></body></html>